# 定义全局变量
num = 100


def demo1():
    print(f'num的值为:{num}')


def demo2():
    global num
    num = 200
    print(f'num的值为{num}')


demo1()
demo2()
